
<template>
  <view>
    <web-view :src="newUrl" />
  </view>
</template>

<script>
export default {
  data() {
    return {
      newUrl: '',
      id:'',
      mobilePhone:'',
      questionnaireName:'',//问卷名称
    }
  },
  onShareAppMessage(res) {
    if (res.from === 'button') { // 来自页面内分享按钮
      console.log(res.target)
    }
    return {
      title: this.questionnaireName,
      imageUrl: `${this.vuex_imgPath}/xfs-520x416.png`,
      path: `/myAccount/questionSurvey/webview?id=${this.id}`
    }
  },
  onLoad(option) {
    this.id = option.id
    this.questionnaireName=option.questionnaireName
    this.mobilePhone=option.mobilePhone
    console.log('传入详情的手机号',this.vuex_accountInfo.mobilePhone,'77777777',this.mobilePhone)
      if(this.vuex_accountInfo.mobilePhone && this.mobilePhone && this.mobilePhone == this.vuex_accountInfo.mobilePhone){
        this.newUrl = `${this.vuex_baseURL.webUrl}/h5/applet-h5/html/questionnaireSurvey/index.html?id=${this.id}&customerPhone=${this.mobilePhone}&pageType=weixin`
      }else{
        uni.redirectTo({ url: `/myAccount/questionSurvey/questionnaireSurvey?id=${this.id}` }) //问卷h5
      }
  },
}
</script>

<style scoped>

</style>

